///////////////////////////////////////////////////////////////////////////////////
// File:        TrayIcon.h
// Purpose:     Declarations of the TrayIcon class. Class used to manage the icon
//              in the system tray.
// Author:      Tukero
// Modified by: 
// Copyright:   (c) Tukero <tukero@gmail.com>
// Licence:     GNU/LGPL v3
///////////////////////////////////////////////////////////////////////////////////

#ifndef _TNOD_TRAYICON_
#define _TNOD_TRAYICON_

#ifndef WX_PRECOMP
#  include <wx/wx.h>
#else
#  include <wx/wxprec.h>
#endif

#include "wx/taskbar.h"          //tray icon

//tray icon with custom ballon tooltip
class TrayIcon: public wxTaskBarIcon
{
private:
    wxString    m_url;
    int         m_action;
    bool        m_insertOpenSettingsMenu;
    enum
    {
        ID_OPENSETTINGS = 10000
    };
public:
    TrayIcon();
    //~TrayIcon() { if (IsIconInstalled()) { RemoveIcon(); } }

    //void SetUrl(wxString url) { m_url = url; }
    //wxString GetUrl() { return m_url; }

    //void EnableBalloonClick() { m_enableBalloonClick = true; }
    //void DisableBalloonClick() { m_enableBalloonClick = false; }
    void ShowSettingsMenu();
    void HideSettingsMenu();

    void OnMenuExit(wxCommandEvent&);
    void OnMenuSettings(wxCommandEvent&);
    void OnLeftClick(wxTaskBarIconEvent& event);
    void OnRightClick(wxTaskBarIconEvent& event);    

    DECLARE_EVENT_TABLE()
};

#endif